package com.exc4.jbv;

import lejos.nxt.ADSensorPort;
import lejos.nxt.Button;
import lejos.nxt.ColorSensor;
import lejos.nxt.LCD;
import lejos.nxt.LightSensor;
import lejos.nxt.SensorPort;
import lejos.robotics.Color;

public class MultiColorSensor {
	private ColorSensor.Color vals;
	private ColorSensor cs;

	public MultiColorSensor(SensorPort p) {
		 cs = new ColorSensor(p);
        cs.setFloodlight(Color.WHITE);

        vals = cs.getColor();
	}

	

	public boolean black() {
			vals = cs.getColor();
			LCD.drawInt(vals.getColor(), 3, 0, 0);
			return vals.getColor() == 7;
	}

	public boolean white() {
		vals = cs.getColor();
		LCD.drawInt(vals.getColor(), 3, 0, 0);
		return vals.getColor() == 6;
	}
	
	public boolean isThirdColor() {
		vals = cs.getColor();
		LCD.drawInt(vals.getColor(), 3, 0, 0);
		return vals.getColor() == 1;
	}
}
